﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Nivdal.Translate" 
Title="Translate - Nivdal.com!" Theme="SkinFile"  Codebehind="Translate.aspx.cs" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, Translate_PageNameLabelText %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:HiddenField ID="LanguageHiddenField" runat="server" />
              
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>       
            <div class="basic_element">
            <asp:FormView ID="TranslationStatusForumView" runat="server" DataSourceID="TranslationStatusDataSourse">   
                <ItemTemplate>  
                    
                    <div class="red_title">
                       <asp:Label ID="DataBaseStringsTranslationTitlaLabel" runat="server" Text="Database translation section" CssClass="white_title"></asp:Label>
                    </div>
                    <div class="padding5">

                        
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" >
                            <ProgressTemplate>
                                <div class="ajaxloader">
                                    <asp:Image ID="ProgressImagePanel1" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
                                </div>
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                         
                        <asp:Label ID="LanguageLabel" runat="server" Text='<%# TranslatorString(Eval("Language_Name")) %>'
                         SkinID="InfoLabel"></asp:Label>
                         <br />
                        <asp:Label ID="StatusTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_StatusTitleLabelText %>"
                         SkinID="InfoLabel"></asp:Label>
                         &nbsp;
                        <asp:Label ID="Statuslabel" runat="server" Text='<%# StatusLabelString(Eval("Translated"), Eval("English")) %>'
                         SkinID="GridLabel"></asp:Label>
                         <br />
                        <asp:HyperLink ID="ToTranslationHomePage" runat="server" Text="Back to translation home page"
                         NavigateUrl="~/TranslateMaster.aspx" SkinID="GreenTitleHyperLink"></asp:HyperLink>
                    </div>
                    
                </ItemTemplate>                
            </asp:FormView>
            <div class="padding5">
            <asp:Label ID="MessageLabel" runat="server" SkinID="GreenSmallHeaderLabel"></asp:Label>
            <br />
            <asp:ListView ID="TranslateListView" runat="server" DataSourceID="TranslateDataSource" >
                <LayoutTemplate>
                    <asp:Label ID="itemplaceholder" runat="server"></asp:Label>
                    <asp:Button ID="SubmitButton" runat="server" Text="<%$ Resources:Resource, Global_Submit %>"
                     Message="<%$ Resources:Resource, Translate_SubmitTranslationOnClientClick %>" CssClass="GreenSmallButtonStyle"
                     OnClientClick='return confirm(this.getAttribute("message"))' OnClick="SubmitButtonClick" />
                     &nbsp;&nbsp;
                    <asp:Button ID="SkipButton" runat="server" Text="<%$ Resources:Resource, Translate_SkipAdminNewsButton %>"
                    Message="<%$ Resources:Resource, Translate_SkipAdminNewsButtonOnClientClick %>" CssClass="GreenSmallButtonStyle" 
                    OnClientClick='return confirm(this.getAttribute("message"))' OnClick="SkipSentence"/>
                </LayoutTemplate>
                <ItemTemplate>
                    <asp:HiddenField ID="SentenceNumHiddenField" runat="server" Value='<%# Eval("SentenceNum") %>' />
                    <asp:HiddenField ID="PartHiddenField" runat="server" Value='<%# Eval("Part") %>' />
                    <table style="width:100%;">
                        <asp:Panel ID="Descriptionpanel" runat="server" Visible='<%# Eval("DescriptionExists") %>'>                       
                            <tr>
                                <td colspan="3">
                                    <asp:Label ID="NextSentenceTitleLabel" runat="server" Text="Next sentence to translate is:" SkinID="InfoLabel"></asp:Label>
                                    <br />
                                    <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' SkinID="GridLabel"></asp:Label>
                                </td>
                            </tr>
                        </asp:Panel>
                        <tr>
                            <td style="width:20%;">
                                <asp:Label ID="EnglishTextTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_EnglishSentenceTitleLabel %>"
                                 SkinID="InfoLabel"></asp:Label>
                            </td>
                            <td style="width:60%;">
                                <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("SentenceText") %>' SkinID="GridLabel"></asp:Label>
                            </td>
                            <td style="width:20%;">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="TranslationTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_YourTranslationTitleLabel %>"
                                 SkinID="InfoLabel"></asp:Label>
                            </td>
                            <td>
                                <CustomControls:TextArea ID="TranslateTextBox" runat="server" Width="300"
                                 Height="80" TextMode="MultiLine"></CustomControls:TextArea>
                            </td>
                            <td>
                                <asp:Label ID="SeparatorLabel" runat="server" Text='<%# Eval("Separator") %>' SkinID="GridLabel"></asp:Label>
                            </td>
                        </tr>
                    </table>           
                    
                </ItemTemplate>
                <EmptyDataTemplate>
                    <asp:Label ID="NothingToTranslateLabel" runat="server" SkinID="GridLabel" 
                    Text="<%$ Resources:Resource, Translate_NothingToTranslateLabelText %>"></asp:Label>
                </EmptyDataTemplate>
                
            </asp:ListView>
            <asp:HyperLink ID="TranslatedSentencesLink" runat="server" NavigateUrl="~/TranslatedSentences.aspx"
                Text="<%$ Resources:Resource, Translate_TranslatedSentencesLinkText %>" SkinID="GreenTitleHyperLink"></asp:HyperLink>
            </div></div>

        </ContentTemplate>
    </asp:UpdatePanel>
    
    <asp:SqlDataSource ID="TranslateDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="Nivdal_GetNextSentenceToTranslate" SelectCommandType="StoredProcedure" >
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="TranslationStatusDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="Nivdal_GetTranslationStatus" SelectCommandType="StoredProcedure" >
    </asp:SqlDataSource>
</asp:Content>

